package com.xiaomage.view.draw4

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.widget.LinearLayout
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        val canvas=CanvasView(this)
        val params=LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.WRAP_CONTENT,
                500
        )
        canvas.layoutParams=params
        ll_zong.addView( canvas)
        val canvasClip=CanvasClipView(this)
        val params2=LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.WRAP_CONTENT,
                1000
        )
        canvasClip.layoutParams=params2
        ll_zong.addView( canvasClip)

    }
}
